package com.wx.jwt.dao;

import com.wx.jwt.po.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @ClassName UserDao
 * @Author wx
 * @Description 用户dao
 * @Date 2018-11-27-22:03
 */
@Mapper
public interface UserDao {


    @Select("select * from user where name = #{name} and password = #{password}")
    User getByNameAndPassword(@Param("name") String name, @Param("password") String password);

    @Insert("insert into user(id, name,password)values(#{id}, #{name}, #{password})")
    int insert(User user);

}
